//所有派出所各月份人员查询总数统计
function AllpcsSearchPerMonth(cr_Data,subnums) {
    var Chart = echarts.init(document.getElementById('allSearchNum'));
    var xdata=[],ydata1=[];
    for (var i = 0;i<cr_Data.length;i++){
        var getData = cr_Data[i];
        xdata.push(getData.name);
        ydata1.push(getData.value);
    }
    var subnum = subnums;
    var option = {
        title:[{
            text:'人员查询总数统计',
            textStyle:{
                fontSize: 20,
                fontWeight: 'bold',
                color:'#000'
            },
            left:'1%',
            top:'2%'
        },{
            text:'共计:' + subnum,
            textStyle:{
                fontSize: 16,
                fontWeight:'normal',
                color:'#136deb'
            },
            right:'1%',
            top:'2%'
        }],
        tooltip: {
            trigger: 'axis'
        },
        dataZoom: [{
            show: true,
            height: 15,
            xAxisIndex: [0],
            bottom: '1%',
            right: '6%',
            left:'6%',
            start: 0,
            end: (7/cr_Data.length)*100, //固定显示8条数据
            handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
            handleSize: '110%',
            borderColor:"#90979c"
        }, {
            type: "inside",
            show: true,
            height: 15,
            start: 1,
            end: 35
        }],
        grid: {
            left: '1%',
            right: '2%',
            top: '16%',
            bottom: '9%',
            containLabel: true
        },
        xAxis: [{
            type: 'category',
            boundaryGap: true,
            axisLine: {
                show: false,
                lineStyle: {
                    color: '#545454'
                }
            },
            axisTick: {
                show: false,
                lineStyle: {
                    type: 'dotted',
                    width: 10,
                }
            },
            axisLabel: {
                // rotate: 25,
                interval: 0,
                textStyle: {
                    fontSize: 13,
                    color: '#545454'
                }
            },
            data: xdata
        }],
        yAxis: [{
            type: 'value',
            axisTick: {
                show: false
            },
            axisLine: {
                show: true,
                lineStyle: {
                    opacity: 0.35,
                    color: '#545454',
                    width: 1
                }
            },
            axisLabel: {
                margin: 10,
                textStyle: {
                    fontSize: 14,
                    color: '#545454'
                }
            },
            splitLine: {
                lineStyle: {
                    opacity: 0.35,
                    color: '#eaeaea',
                    width: 2
                }

            }
        }],
        series: [{
            name: '人员查询总数',
            type: 'line',
            symbol: 'circle',
            symbolSize: 5,
            showSymbol: true,
            lineStyle: {
                normal: {
                    width: 2,
                    color: '#15d6af'
                }
            },
            label:{
                position:'top',
                show:true,
                textStyle:{
                    color:'#000',
                    fontSize:14
                }
            },
            areaStyle: {
                color: {
                    type: 'linear',
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [{
                        offset: 0,
                        color: 'rgba(21,214,175, 0.5)' // 0% 处的颜色
                    }, {
                        offset: 0.2,
                        color: 'rgba(21,214,175, 0.1)' // 100% 处的颜色
                    }],
                    globalCoord: false // 缺省为 false
                }
            },
            itemStyle: {
                normal: {
                    color: '#15d6af'
                },
                emphasis:{
                    borderColor: 'rgba(255,150,49,0.27)',
                    borderWidth: 12
                }
            },

            data: ydata1
        }]
    };
    Chart.setOption(option);
}

// 各类打印统计
function allTypeStatic(cr_Data,subnums) {
    console.log(cr_Data);
    var Chart = echarts.init(document.getElementById('allTypeStatic'));
    var xdata=[],ydata1=[],ydata2=[];
    for (var i = 0;i<cr_Data.length;i++){
        var getData = cr_Data[i];
        xdata.push(getData.name);
        ydata1.push(getData.zj_num);
        ydata2.push(getData.ck_num);
    }
    var subnum = subnums;
    var option = {
        title:[{
            text:'各类打印统计',
            textStyle:{
                fontSize: 20,
                fontWeight: 'bold',
                color:'#000'
            },
            left:'1%',
            top:'2%'
        },{
            text:'共计:' + subnum,
            textStyle:{
                fontSize: 16,
                fontWeight:'normal',
                color:'#136deb'
            },
            right:'1%',
            top:'2%'
        }],
        tooltip: {
            trigger: 'axis',
            formatter:function (par) {
                var sum = par[0].value + par[1].value;
                return par[0].name + '<br>' + par[0].marker + par[0].seriesName +'：' + par[0].value
                    + '<br>' + par[1].marker + par[1].seriesName +'：' + par[1].value
                    + '<br>&nbsp;&nbsp;&nbsp;&nbsp;总数：' + sum;
            }
        },
        dataZoom: [{
            show: true,
            height: 15,
            xAxisIndex: [0],
            bottom: '1%',
            right: '6%',
            left:'6%',
            start: 0,
            end: (7/cr_Data.length)*100, //固定显示8条数据
            handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
            handleSize: '110%',
            borderColor:"#90979c"
        }, {
            type: "inside",
            show: true,
            height: 15,
            start: 1,
            end: 35
        }],
        legend: {
            orient: 'horizontal',
            align: 'left',
            itemWidth: 20,
            itemHeight: 11,
            top: '2%',
            x:'center',
            textStyle: {
                color: '#545454',
                fontSize: 14,
                fontFamily: 'Microsoft YaHei',
            },
            icon: 'roundRect',
            data: ["自助打印机","窗口打印"]
        },
        grid: {
            left: '1%',
            right: '2%',
            top: '16%',
            bottom: '9%',
            containLabel: true
        },
        xAxis: [{
            type: 'category',
            boundaryGap: true,
            axisLine: {
                show: false,
                lineStyle: {
                    color: '#545454'
                }
            },
            axisTick: {
                show: false,
                lineStyle: {
                    type: 'dotted',
                    width: 10,
                }
            },

            axisLabel: {
                // rotate: 25,
                interval: 0,
                textStyle: {
                    fontSize: 12,
                    color: '#545454'
                }
            },
            data: xdata
        }],
        yAxis: [{
            type: 'value',
            axisTick: {
                show: false
            },
            axisLine: {
                show: true,
                lineStyle: {
                    opacity: 0.35,
                    color: '#545454',
                    width: 1
                }
            },
            axisLabel: {
                margin: 10,
                textStyle: {
                    fontSize: 14,
                    color: '#545454'
                }
            },
            splitLine: {
                lineStyle: {
                    opacity: 0.35,
                    color: '#eaeaea',
                    width: 2
                }

            }
        }],
        series: [{
            name: '自助打印机',
            type: 'line',
            symbol: 'circle',
            symbolSize: 5,
            showSymbol: false,
            lineStyle: {
                normal: {
                    width: 2,
                    color: '#ff9631',
                }
            },
            areaStyle: {
                color: {
                    type: 'linear',
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [{
                        offset: 0,
                        color: 'rgba(255,150,49, 0.5)' // 0% 处的颜色
                    }, {
                        offset: 0.2,
                        color: 'rgba(255,150,49, 0.1)' // 100% 处的颜色
                    }],
                    globalCoord: false // 缺省为 false
                }
            },
            itemStyle: {
                normal: {
                    color: '#ff9631',
                    borderColor: 'rgba(255,150,49,0.27)',
                    borderWidth: 12
                }
            },

            data: ydata1
        }, {
            name: '窗口打印',
            type: 'line',
            symbol: 'circle',
            symbolSize: 5,
            showSymbol: false,
            lineStyle: {
                normal: {
                    width: 2,
                    color: '#00beff'
                }
            },
            areaStyle: {
                color: {
                    type: 'linear',
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [{
                        offset: 0,
                        color: 'rgba(0,190,255, 0.5)' // 0% 处的颜色
                    }, {
                        offset: 0.5,
                        color: 'rgba(0,190,255, 0.1)' // 100% 处的颜色
                    }],
                    globalCoord: false // 缺省为 false
                }
            },
            itemStyle: {
                normal: {
                    color: '#00beff',
                    borderColor: 'rgba(0,190,255,0.27)',
                    borderWidth: 12

                }
            },

            data: ydata2
        }]
    };
    Chart.setOption(option);
}

// 派出所打印统计
function printStatic(cr_Data,subnums) {
    var Chart = echarts.init(document.getElementById('printStatic'));
    var xdata=[],ydata=[];
    for (var i = 0;i<cr_Data.length;i++){
        var getData = cr_Data[i];
        xdata.push(getData.name);
        ydata.push(getData.value);
    }
    var subnum = subnums;
    option = {
        title:[{
            text:'派出所打印统计',
            textStyle:{
                fontSize: 20,
                fontWeight: 'bold',
                color:'#000'
            },
            left:'1%',
            top:'3%'
        },{
            text:'共计:' + subnum,
            textStyle:{
                fontSize: 16,
                fontWeight:'normal',
                color:'#136deb'
            },
            right:'1%',
            top:'2%'
        }],
        tooltip: {
            trigger: 'item',
        },
        grid: {
            left: '2%',
            right: '2%',
            top: '17%',
            bottom: '9%',
            containLabel: true
        },
        dataZoom: [{
            show: true,
            height: 15,
            xAxisIndex: [0],
            bottom:'1%',
            start: 0,
            end: 50,
            handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
            handleSize: '110%',
            handleStyle:{
                color:"#d3dee5"
            },
            textStyle:{
                color:"#545454"
            },
            borderColor:"#90979c"
        }, {
            type: "inside",
            show: true,
            height: 15,
            start: 1,
            end: 35
        }],
        xAxis: [{
            type: 'category',
            data: xdata,
            axisLine: {
                show: true,
                lineStyle: {
                    color: "#545454",
                    width: 1,
                    type: "solid"
                }
            },
            splitLine: {
                show: true,
                lineStyle: {
                    color: '#eaeaea'
                }
            },
            axisTick: {
                show: false
            },
            axisLabel: {
                show: true,
                interval: 0,
                textStyle: {
                    color: "#545454",
                    fontSize: 12
                }
            },
        }],
        yAxis: [{
            type: 'value',
            axisLabel: {
                formatter: '{value}',
                color: '#545454',
                fontSize: 14
            },

            splitLine: {
                show: true,
                lineStyle: {
                    color: '#eaeaea'
                }
            },
            axisLine: {
                show: true,
                lineStyle: {
                    color: '#545454'
                }
            },
            axisTick: {
                show: false
            }
        }],
        series: [{
            name: '打印统计',
            type: 'bar',
            data: ydata,
            barWidth: 30, //柱子宽度
            itemStyle: {
                normal: {
                    color:  '#ff838f'
                    //     {
                    //     type: 'linear',
                    //     x: 0,
                    //     y: 0,
                    //     x2: 0,
                    //     y2: 1,
                    //     colorStops: [{
                    //         offset: 0,
                    //         color: '#00cb7c' // 0% 处的颜色
                    //     }, {
                    //         offset: 1,
                    //         color: '#00ffe4' // 100% 处的颜色
                    //     }],
                    // }
                }
            },
            label: {
                normal: {
                    show: true,
                    position: 'top',
                    color: '#1d1d1d',
                    formatter: '{c}',
                    fontSize: 14
                }
            }
        }]
    };
    Chart.setOption(option);
}

// 饼图
function pieAll(cr_Data,subnums) {
    var intactrateChart = echarts.init(document.getElementById('pieAll'));
    var subnum = subnums;
    option = {
        title:[{
            text:'打印情况统计',
            textStyle:{
                fontSize: 20,
                fontWeight: 'bold',
                color:'#000'
            },
            left:'1%',
            top:'3%'
        },{
            text:'共计:' + subnum,
            textStyle:{
                fontSize: 16,
                fontWeight:'normal',
                color:'#136deb'
            },
            right:'1%',
            top:'2%'
        }],
        tooltip: {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c}次 ({d}%)"
        },
        color: ['#009dff', '#ff5700'],
        series: [{
            name: '打印统计',
            type: 'pie',
            center: ['50%', '55%'],
            radius: '63%',
            avoidLabelOverlap: false,
            label: {
                normal: {
                    show: true,
                    position: 'outter',
                    formatter: "{b}：{c}次\n{d}%",
                    textStyle: {
                        fontSize: 16,
                        lineHeight: 20
                    },
                }

            },
            labelLine: {
                normal: {
                    show: true,
                    length: 20,
                    length2: 20,
                }
            },
            data: cr_Data
        }]
};
    intactrateChart.setOption(option);
}

// 各月份人员查询总数统计
function searchPerMonth(month,cr_Data) {
    var Chart = echarts.init(document.getElementById('searchPersonAll'));
    var xdata=[],ydata1=[],ifShow = [],bottom='2%';

    for (var i = 0;i<cr_Data.length;i++){
        var getData = cr_Data[i];
        xdata.push(getData.name);
        ydata1.push(getData.value);
    }
    if(cr_Data.length > 10 ){
        ifShow = [true,0,(9/cr_Data.length)*100];       //固定显示10条
        bottom = '9%';
    }else{
        ifShow = [false,0,100];
    }
    month = month.replace("0","");
    var option = {
        title:{
            text:month+'月人员查询总数统计',
            textStyle:{
                fontSize: 20,
                fontWeight: 'bold',
                color:'#000',
                left:'1%',
                top:'2%'
            }
        },
        tooltip: {
            trigger: 'axis'
        },
        dataZoom: [{
            show: ifShow[0],
            height: 15,
            xAxisIndex: [0],
            bottom: '1%',
            right: '6%',
            left:'6%',
            start: ifShow[1],
            end: ifShow[2],
            handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
            handleSize: '110%',
            borderColor:"#90979c"
        }, {
            type: "inside",
            show: true,
            height: 15,
            start: 1,
            end: 35
        }],
        grid: {
            left: '1%',
            right: '2%',
            top: '16%',
            bottom: bottom,
            containLabel: true
        },
        xAxis: [{
            type: 'category',
            boundaryGap: true,
            axisLine: {
                show: false,
                lineStyle: {
                    color: '#545454'
                }
            },
            axisTick: {
                show: false,
                lineStyle: {
                    type: 'dotted',
                    width: 10,
                }
            },
            axisLabel: {
                // rotate: 25,
                interval: 0,
                textStyle: {
                    fontSize: 13,
                    color: '#545454'
                }
            },
            data: xdata
        }],
        yAxis: [{
            type: 'value',
            axisTick: {
                show: false
            },
            axisLine: {
                show: true,
                lineStyle: {
                    opacity: 0.35,
                    color: '#545454',
                    width: 1
                }
            },
            axisLabel: {
                margin: 10,
                textStyle: {
                    fontSize: 14,
                    color: '#545454'
                }
            },
            splitLine: {
                lineStyle: {
                    opacity: 0.35,
                    color: '#eaeaea',
                    width: 2
                }

            }
        }],
        series: [{
            name: '人员查询总数',
            type: 'line',
            symbol: 'circle',
            symbolSize: 5,
            showSymbol: true,
            lineStyle: {
                normal: {
                    width: 2,
                    color: '#15d6af'
                }
            },
            label:{
                position:'top',
                show:true,
                textStyle:{
                    color:'#000',
                    fontSize:14
                }
            },
            areaStyle: {
                color: {
                    type: 'linear',
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [{
                        offset: 0,
                        color: 'rgba(21,214,175, 0.5)' // 0% 处的颜色
                    }, {
                        offset: 0.2,
                        color: 'rgba(21,214,175, 0.1)' // 100% 处的颜色
                    }],
                    globalCoord: false // 缺省为 false
                }
            },
            itemStyle: {
                normal: {
                    color: '#15d6af'
                },
                emphasis:{
                    borderColor: 'rgba(255,150,49,0.27)',
                    borderWidth: 12
                }
            },

            data: ydata1
        }]
    };
    Chart.setOption(option);
}

// 本月打印统计
function thisMonthPrint(month,cr_Data) {
    var Chart = echarts.init(document.getElementById('thisMonthPrint'));
    var xdata=[],ydata1=[],ydata2=[],ifShow = [],bottom='4%';
    for (var i = 0;i<cr_Data.length;i++){
        var getData = cr_Data[i];
        xdata.push(getData.name);
        ydata1.push(getData.zj_num);
        ydata2.push(getData.ck_num);
    }
    if(cr_Data.length > 10 ){
        ifShow = [true,0,(9/cr_Data.length)*100];       //固定显示10条
        bottom = '9%';
    }else{
        ifShow = [false,0,100];
    }
    month = month.replace("0","");
    var option = {
        title:{
            text:month+'月打印统计',
            textStyle:{
                fontSize: 20,
                fontWeight: 'bold',
                color:'#000',
                left:'1%',
                top:'3%'
            }
        },
        tooltip: {
            trigger: 'axis',
            formatter:function (par) {
                var sum = par[0].value + par[1].value;
                return par[0].name + '<br>' + par[0].marker + par[0].seriesName +'：' + par[0].value
                    + '<br>' + par[1].marker + par[1].seriesName +'：' + par[1].value
                    + '<br>&nbsp;&nbsp;&nbsp;&nbsp;总数：' + sum;
            }
        },
        legend: {
            orient: 'horizontal',
            align: 'left',
            itemWidth: 20,
            itemHeight: 11,
            top: '1.5%',
            textStyle: {
                color: '#545454',
                fontSize: 14,
                fontFamily: 'Microsoft YaHei',
            },
            icon: 'roundRect',
            data: ["自助打印机","窗口打印"]
        },
        grid: {
            left: '1%',
            right: '1%',
            top: '13%',
            // bottom: '17%',
            bottom: bottom,
            containLabel: true
        },
        dataZoom: [{
            show: ifShow[0],
            height: 15,
            xAxisIndex: [0],
            bottom: '1%',
            right: '6%',
            left:'6%',
            start: ifShow[1],
            end: ifShow[2],
            handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
            handleSize: '110%',
            borderColor:"#90979c"
        }, {
            type: "inside",
            show: true,
            height: 15,
            start: 1,
            end: 35
        }],
        xAxis: [{
            type: 'category',
            boundaryGap: true,
            axisLine: {
                show: false,
                lineStyle: {
                    color: '#545454'
                }
            },
            axisTick: {
                show: false,
                lineStyle: {
                    type: 'dotted',
                    width: 10,
                }
            },

            axisLabel: {
                // rotate: 25,
                interval: 0,
                textStyle: {
                    fontSize: 13,
                    color: '#545454'
                }
            },
            data: xdata
        }],
        yAxis: [{
            type: 'value',
            axisTick: {
                show: false
            },
            axisLine: {
                show: true,
                lineStyle: {
                    opacity: 0.35,
                    color: '#545454',
                    width: 1
                }
            },
            axisLabel: {
                margin: 10,
                textStyle: {
                    fontSize: 14,
                    color: '#545454'
                }
            },
            splitLine: {
                lineStyle: {
                    opacity: 0.35,
                    color: '#eaeaea',
                    width: 2
                }

            }
        }],
        series: [{
            name: '自助打印机',
            type: 'line',
            symbol: 'circle',
            symbolSize: 5,
            showSymbol: false,
            lineStyle: {
                normal: {
                    width: 2,
                    color: '#ff9631',
                }
            },
            label:{
                position:'top',
                show:true,
                textStyle:{
                    color:'#000',
                    fontSize:14
                }
            },
            areaStyle: {
                color: {
                    type: 'linear',
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [{
                        offset: 0,
                        color: 'rgba(255,150,49, 0.5)' // 0% 处的颜色
                    }, {
                        offset: 0.2,
                        color: 'rgba(255,150,49, 0.1)' // 100% 处的颜色
                    }],
                    globalCoord: false // 缺省为 false
                }
            },
            itemStyle: {
                normal: {
                    color: '#ff9631'
                },
                emphasis:{
                    borderColor: 'rgba(255,150,49,0.27)',
                    borderWidth: 12
                }
            },

            data: ydata1
        }, {
            name: '窗口打印',
            type: 'line',
            symbol: 'circle',
            symbolSize: 5,
            showSymbol: false,
            lineStyle: {
                normal: {
                    width: 2,
                    color: '#00beff'
                }
            },
            areaStyle: {
                color: {
                    type: 'linear',
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [{
                        offset: 0,
                        color: 'rgba(0,190,255, 0.5)' // 0% 处的颜色
                    }, {
                        offset: 0.5,
                        color: 'rgba(0,190,255, 0.1)' // 100% 处的颜色
                    }],
                    globalCoord: false // 缺省为 false
                }
            },
            label:{
                position:'top',
                show:true,
                textStyle:{
                    color:'#000',
                    fontSize:14
                }
            },
            itemStyle: {
                normal: {
                    color: '#00beff'
                },
                emphasis:{
                    borderColor: 'rgba(0,190,255,0.27)',
                    borderWidth: 12
                }
            },

            data: ydata2
        }]
    };
    Chart.setOption(option);
}

// 今年打印总数
function yearPrint(cr_Data) {
    var Chart = echarts.init(document.getElementById('yearPrint'));
    var xdata=[],ydata=[];
    for (var i = 0;i<cr_Data.length;i++){
        var getData = cr_Data[i];
        xdata.push(getData.name);
        ydata.push(getData.value);
    }
    option = {
        title:{
            text:'今年打印总数',
            textStyle:{
                fontSize: 20,
                fontWeight: 'bold',
                color:'#000',
                left:'1%',
                top:'3%'
            }
        },
        tooltip: {
            trigger: 'item'
        },
        grid: {
            left: '2%',
            right: '2%',
            top: '13%',
            bottom: '1%',
            containLabel: true
        },
        xAxis: [{
            type: 'category',
            data: xdata,
            axisLine: {
                show: true,
                lineStyle: {
                    color: "#545454",
                    width: 1,
                    type: "solid"
                }
            },
            splitLine: {
                show: true,
                lineStyle: {
                    color: '#eaeaea'
                }
            },
            axisTick: {
                show: false
            },
            axisLabel: {
                show: true,
                interval: 0,
                textStyle: {
                    color: "#545454",
                    fontSize: 13
                }
            },
        }],
        yAxis: [{
            type: 'value',
            axisLabel: {
                formatter: '{value}',
                color: '#545454',
                fontSize: 14
            },

            splitLine: {
                show: true,
                lineStyle: {
                    color: '#eaeaea'
                }
            },
            axisLine: {
                show: true,
                lineStyle: {
                    color: '#545454'
                }
            },
            axisTick: {
                show: false
            }
        }],
        series: [{
            name: '今年打印总数',
            type: 'bar',
            data: ydata,
            barWidth: 30, //柱子宽度
            itemStyle: {
                normal: {
                    color:  '#ff838f'
                    //     {
                    //     type: 'linear',
                    //     x: 0,
                    //     y: 0,
                    //     x2: 0,
                    //     y2: 1,
                    //     colorStops: [{
                    //         offset: 0,
                    //         color: '#00cb7c' // 0% 处的颜色
                    //     }, {
                    //         offset: 1,
                    //         color: '#00ffe4' // 100% 处的颜色
                    //     }],
                    // }
                }
            },
            label: {
                normal: {
                    show: true,
                    position: 'top',
                    color: '#1d1d1d',
                    formatter: '{c}',
                    fontSize: 14
                }
            }
        }]
    };
    Chart.setOption(option);
}


// 饼图
function pieType(cr_Data) {
    var intactrateChart = echarts.init(document.getElementById('pieType'));
    option = {
        title:{
            text:'打印情况统计',
            textStyle:{
                fontSize: 20,
                fontWeight: 'bold',
                color:'#000',
                left:'1%',
                top:'3%'
            }
        },
        tooltip: {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c}次 ({d}%)"
        },
        color: ['#009dff', '#ff5700'],
        series: [{
            name: '打印统计',
            type: 'pie',
            center: ['50%', '58%'],
            radius: '63%',
            avoidLabelOverlap: false,
            label: {
                normal: {
                    show: true,
                    position: 'outter',
                    formatter: "{b}：{c}次\n{d}%",
                    textStyle: {
                        fontSize: 16,
                        lineHeight: 20
                    },
                }

            },
            labelLine: {
                normal: {
                    show: true,
                    length: 20,
                    length2: 20,
                }
            },
            data: cr_Data
        }]
    };
    intactrateChart.setOption(option);
}
